package com.bida.service;

import com.bida.domain.dto.CategoryDTO;
import com.bida.domain.po.Category;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bida.result.PageResult;
import com.bida.result.Result;

import java.util.List;

/**
 * <p>
 * 菜品及套餐分类 服务类
 * </p>
 *
 * @author ly
 * @since 2024-09-06
 */
public interface ICategoryService extends IService<Category> {

    Result<PageResult> pageGetCategory(String name, Integer page, Integer pageSize, Integer type);

    Result insertNewCategory(CategoryDTO categoryDTO);

    Result updateStatusById(Integer status, Long id);

    Result updateCategoryInfoById(CategoryDTO categoryDTO);

    Result deleteCategoryById(Long id);

    Result<List<Category>> getPageCategoryList(Integer type);
    /**
     * 根据类型查询分类
     * @param type
     * @return
     */
    List<Category> getAllList(Integer type);
}
